<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlertRelateOrderNoToMybankVostroBillTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('mybank_vostro_bill', function (Blueprint $table) {
            $table->string('relateOrderNo')->default('')->after('withdrawApplyDate')->comment('关联网商订单号');
            $table->string('relateTransNo')->default('')->after('relateOrderNo')->comment('关联网商支付流水号');
            $table->string('participantActualRefundAmount')->default('')->after('relateTransNo')->comment('商户实际退款金额');
            $table->string('participantType')->default('')->after('participantActualRefundAmount')->comment('退款参与方类型 商户(MERCHANT)、 平台(PLATFORM)、 保证金账号(SUBACCOUNT)');
            $table->string('participantId')->default('')->after('participantType')->comment('退款参与方id 如果是商户，则填入merchantId,如果是平台，则填入isvOrgId,当ParticipantType为SUBACCOUNT（保证金账号）时ParticipantId为保证金的账号');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('mybank_vostro_bill', function (Blueprint $table) {
            $table->dropColumn('relateOrderNo');
            $table->dropColumn('relateTransNo');
            $table->dropColumn('participantActualRefundAmount');
            $table->dropColumn('participantType');
            $table->dropColumn('participantId');
        });
    }
}
